package com.psd.demo.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.pds.mvc.ActionForward;
import com.pds.mvc.Actions;

public class RegisterServlet  extends Actions{

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		String name =request.getParameter("userName");
		Map<String,Object> map = new HashMap<String,Object>();
		if("viken".equals(name)){
			map.put("data", 0);			
		}else{
			map.put("data", 1);	
		}
		outPrintJson(response,ObjectToJsonString(map));
		return null;
	}

}
